import request from '@/utils/request'
//  获取对应广告位的所以广告
export const getAllAds = (params) => {
  return request({
    method: 'GET',
    url: '/front/ad/getAllAds',
    params
  })
}
// 分页获取课程
// export const getQueryCourses = (data) => {
//   return request({
//     method: 'POST',
//     url: '/front/course/getQueryCourses',
//     data
//   })
// }

export const getQueryCourses = (data) => {
  return request({
    method: 'POST',
    url: '/boss/course/getQueryCourses',
    data
  })
}
// 获取已购课程
export const getPurchaseCourse = () => {
  return request({
    method: 'GET',
    url: '/front/course/getPurchaseCourse'
  })
}
// 获取课程详情
export const getCourseById = (params) => {
  return request({
    method: 'GET',
    url: '/front/course/getCourseById',
    params
  })
}
// 获取课程章节信息
export const getSectionAndLesson = (params) => {
  return request({
    method: 'GET',
    url: '/front/course/session/getSectionAndLesson',
    params
  })
}
// 根据fileId获取阿里云对应的视频播放信息
export const getVideoPlayInfo = (params) => {
  return request({
    method: 'GET',
    url: '/front/course/media/videoPlayInfo',
    params
  })
}
